/**
 * 
 */
package com.jie.eclipse.pan.views;

import org.eclipse.gef.ui.palette.PaletteContextMenuProvider;
import org.eclipse.gef.ui.palette.PaletteViewer;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.part.ViewPart;

import com.jie.eclipse.pan.dao.QMDao;
import com.jie.eclipse.pan.data.BaseDataEntity;
import com.jie.eclipse.pan.gef.action.OpenBrowserAction;
import com.jie.eclipse.pan.gef.action.OpenDialogAction;
import com.jie.eclipse.pan.gef.dialog.PanconfigDialog;

/**
 * @author yanjie
 *
 */
public class PanPaletteContextMenuProvider extends PaletteContextMenuProvider{

	/**
<%! int i = 0;%>
<%
System.out.println(i);
%>

	 * @param palette
	 */
	public PanPaletteContextMenuProvider(ViewPart part,PaletteViewer palette) {
		super(palette);
	}
	
	
	@Override
	public void buildContextMenu(IMenuManager menu) {
		BaseDataEntity config = new BaseDataEntity();
		config.spsv("text", "基本设置");
		config.spsv("action", "setPanConfig");
		menu.add(new OpenDialogAction(PanconfigDialog.class.getName(),
				new Object[]{Display.getDefault().getActiveShell(),new BaseDataEntity(),"fillPanConfig"},
				config));
		//super.buildContextMenu(menu);
	}
	
}
